package com.mtsmda.designPattern.composite;

import java.util.ArrayList;
import java.util.List;

public class Drawing implements ShapeI {
	private List<ShapeI> shapeIs = new ArrayList<ShapeI>();

	@Override
	public void draw(String fillColor) {
		for (ShapeI shapeI : this.shapeIs) {
			shapeI.draw(fillColor);
		}
	}

	public void addShapeI(ShapeI shapeI) {
		this.shapeIs.add(shapeI);
	}

	public void deleteShapeI(ShapeI shapeI) {
		this.shapeIs.remove(shapeI);
	}

	public void clearShapeI() {
		this.shapeIs.clear();
	}

}